package com.example.order.service;

import com.example.inventory.api.InventoryApi;
import com.example.order.config.DefaultHystrixConfig;
import com.example.order.service.fallback.InventoryApiServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;

/**
 * 调用库存微服务 相关api
 *  参数里还有一个configuration的,可以自己配置参数,比如重试次数等等, 如此便可以不受yml配置的限制,特殊处理
 * @author james
 */
@FeignClient(value = "inventory-service"
        , configuration = DefaultHystrixConfig.class
        , fallbackFactory = InventoryApiServiceFallbackFactory.class
)
public interface InventoryApiService extends InventoryApi {

}
